package com.yfqy.admin.domain.mapper;

import com.yfqy.admin.domain.dto.auth.AuthMenu;
import com.yfqy.admin.domain.dto.system.MenusWithRole;
import com.yfqy.admin.domain.dto.system.SysMenuDetail;
import com.yfqy.admin.domain.entity.SysMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysMenuMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysMenu record);

    int insertSelective(SysMenu record);

    SysMenu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysMenu record);

    int updateByPrimaryKey(SysMenu record);

    List<AuthMenu> selectMenusByRoleIds(@Param("roleIds") List<Long> roleIds);

    List<AuthMenu> selectMenusByAdmin();

    List<SysMenuDetail> selectRolesMenus(@Param("roleIds") List<Long> roleIds);

    List<SysMenuDetail> selectAdminMenus();

    SysMenuDetail selectById(Long id);

    List<SysMenuDetail> getSysMenuPage(@Param("menuName") String menuName);

    List<SysMenu> selectByIds(@Param("ids") List<Long> addMenuIds);

    List<MenusWithRole> selectAllValid();

    SysMenu selectOneMenusByCode(@Param("code") String code);

    List<SysMenu> selectByPid(@Param("pid") Long pid);
}